package com.javaziliao.design.ordermanagement.command.receiver;

import com.javaziliao.design.pojo.Order;
import org.springframework.stereotype.Component;

@Component
public class OrderCommandReceiver {
    public void action(Order order){
        switch (order.getOrderState()){
            case ORDER_WAIT_PAY:
                System.out.println("订单状态为待支付");
                return;
            case ORDER_WAIT_SEND:
                System.out.println("订单状态为待发货");
                return;
            case ORDER_WAIT_RECEIVE:
                System.out.println("订单状态为待收货");
                return;
            case ORDER_FINISH:
                System.out.println("订单状态为已完成");
                return;
            default:
                System.out.println("订单状态错误");
        }
    }
}
